{% extends '@SyliusShop/layout.html.twig' %}

{% block content %}
    <div class="ui hidden divider"></div>
    <div class="ui stackable grid" id="reviews">
        <div class="four wide column">
            {{ sonata_block_render_event('sylius.shop.product_review.index.before_product_box', {'product_reviews': product_reviews}) }}

            {{
                render(url('sylius_shop_partial_product_show_by_slug', {
                    'slug': app.request.attributes.get('slug'),
                    'template': '@SyliusShop/Product/_box.html.twig'
                }))
            }}

            {{ sonata_block_render_event('sylius.shop.product_review.index.after_product_box', {'product_reviews': product_reviews}) }}
        </div>
        <div class="twelve wide column">
            <div class="ui segment" id="sylius-product-reviews">
                {{ sonata_block_render_event('sylius.shop.product_review.index.before_list', {'product_reviews': product_reviews}) }}

                {% include '@SyliusShop/ProductReview/_list.html.twig' %}

                {{ sonata_block_render_event('sylius.shop.product_review.index.after_list', {'product_reviews': product_reviews}) }}
                <a href="{{ path('sylius_shop_product_review_create', {'slug': app.request.get('slug')}) }}">
                    <div class="ui blue labeled icon button"><i class="icon plus"></i> {{ 'sylius.ui.add_your_review'|trans }}</div>
                </a>
            </div>
        </div>
    </div>
{% endblock %}
